var builder = WebApplication.CreateBuilder(args);

// Add services to the container.

builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerDocument();
builder.Services.AddCors(options=>options.AddPolicy("any",builder=>builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()));
var app = builder.Build();

// Configure the HTTP request pipeline.

app.UseStaticFiles();
app.UseCors("any");
app.UseSwaggerUi().UseOpenApi();

app.MapControllers();

app.Run();
